package com.bana.fvs.service;

import com.bana.fvs.dao.ProgramDAO;
import com.bana.fvs.model.Program;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * 雾区方案
 */
@Service
public class ProgramService {

    @Resource
    private ProgramDAO programDAO;

    /**
     * 批量修改雾区固定方案使用状态
     * @param programs 方案集合
     */
    @Transactional
    public void updateStatus(List<Program> programs){

        for (Program program:programs){
            programDAO.updateProgramStatus(program.getFabm(),program.getSfsy());
        }
    }
}
